
<%@page import="com.udc.medLine.entity.*"%>
<%@page import="com.udc.medLine.dao.*"%>
<%@page import="com.udc.medLine.controller.*"%>
<%@page import="com.udc.medLine.utils.*"%>
<%@page import="java.util.*"%>


<script>


   function sairUsuario(){
	   <%
	   	if (SecurityUtils.isClienteAuthenticated(session)) {
	   %>
       window.location.href = "/med-line/?method=sairUsuario";
	   <%
	   	}else{	   		
	   %>
       window.location.href = "/med-line/page/admin/?method=sairUsuario";
	   <%
	   	}
	   %>
    }
</script>


<%
	if (SecurityUtils.isAuthenticated(session)) {
%> 
	   <div id="usuarioLogado" style="height: 80px">
			<form style="height: 300px"> 		      
		      <h4>Bem Vindo
		          <%=SecurityUtils.getAuthenticatedUser(session).getNome() %>
		      </h4>
					<input type="button" class="buttonslogin" onclick="sairUsuario()" value="Sair" /> 		
				
			</form>
		</div>   
<%
 	}
%>